@extends('layout.userinfo')
@section('content')
    <div class="profile-panel" role="main">
            <!-- ngIf: pageTitleVisible -->
            <h3 ng-if="pageTitleVisible" class="profile-paneltitle ng-scope">
                        <span ng-bind="pageTitle" class="ng-binding">
                            地址管理
                        </span>
                        <span class="subtitle ng-binding" ng-bind-html="pageSubtitle | toTrusted">
                        </span>
            </h3>

            <div class="profile-panelcontent" ng-transclude="">
                <div class="desktop-addresslist clearfix ng-scope" ng-hide="addressLoading">
                    @foreach($res as $val)
                    <div class="desktop-addressblock ng-scope" ng-repeat="address in userAddresses">
                        <div class="desktop-addressblock-buttons">
                            <a href="/deleteAdress/{{$val->id}}"class="desktop-addressblock-button">
                                删除
                            </a>
                        </div>
                        <div class="desktop-addressblock-name ng-binding">
                             {{$val->name}}
                                    <span class="ng-binding">
                                        @if($val->sex)
                                            女士
                                        @else
                                            先生
                                        @endif
                                    </span>
                        </div>
                        <div class="desktop-addressblock-address ng-binding" ng-bind="address.address + &#39; &#39; + address.address_detail">
                            {{$val->address}}
                        </div>
                        <div class="desktop-addressblock-mobile ng-binding" ng-bind="address.phone">
                            {{$val->tel}}
                        </div>
                        <div class="desktop-addressblock-mask ng-hide" ng-show="showMask">
                        </div>



                    </div>

@endforeach
                    <!-- end ngRepeat: address in userAddresses -->
                    <button class="desktop-addressblock desktop-addressblock-addblock" ng-click="/addAdress">
                        <i class="icon-plus">
                        </i>
                        <a href="/address">添加新地址</a>
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection